Optimal. Leaf size=38 \[ -\frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \cot (e+f x)}{\sqrt {a-a \csc (e+f x)}}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3886, 221}
\begin {gather*} -\frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \cot (e+f x)}{\sqrt {a-a \csc (e+f x)}}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 3886
Rubi steps
\begin {align*} \int \sqrt {-\csc (e+f x)} \sqrt {a-a \csc (e+f x)} \, dx &=\frac {2 \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \cot (e+f x)}{\sqrt {a-a \csc (e+f x)}}\right )}{f}\\ &=-\frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \cot (e+f x)}{\sqrt {a-a \csc (e+f x)}}\right )}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(101\) vs. \(2(38)=76\).
time = 1.35, size = 101, normalized size = 2.66 \begin {gather*} \frac {2 \left (\sinh ^{-1}\left (\tan \left (\frac {1}{2} (e+f x)\right )\right )+\tanh ^{-1}\left (\sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )}\right )\right ) \sqrt {-\csc (e+f x)} \sqrt {a-a \csc (e+f x)} \tan \left (\frac {1}{2} (e+f x)\right )}{f \sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )} \left (-1+\tan \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(116\) vs.
\(2(32)=64\).
time = 1.26, size = 117, normalized size = 3.08
method | result | size |
default | \(\frac {2 \sqrt {-\frac {1}{\sin \left (f x +e \right )}}\, \left (\cos \left (f x +e \right )-1\right ) \sqrt {\frac {a \left (\sin \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}}\, \left (\arctan \left (\frac {\sin \left (f x +e \right ) \sqrt {-\frac {2}{1+\cos \left (f x +e \right )}}}{2}\right )-\arctan \left (\frac {1}{\sqrt {-\frac {2}{1+\cos \left (f x +e \right )}}}\right )\right )}{f \left (-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )\right ) \sqrt {-\frac {2}{1+\cos \left (f x +e \right )}}}\) | \(117\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs.
\(2 (34) = 68\).
time = 3.85, size = 322, normalized size = 8.47 \begin {gather*} \left [\frac {\sqrt {a} \log \left (\frac {a \cos \left (f x + e\right )^{3} - 7 \, a \cos \left (f x + e\right )^{2} - 4 \, {\left (\cos \left (f x + e\right )^{3} + 3 \, \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) - 3\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 3\right )} \sqrt {a} \sqrt {\frac {a \sin \left (f x + e\right ) - a}{\sin \left (f x + e\right )}} \sqrt {-\frac {1}{\sin \left (f x + e\right )}} - 9 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right )^{2} + 8 \, a \cos \left (f x + e\right ) - a\right )} \sin \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 1}\right )}{2 \, f}, \frac {\sqrt {-a} \arctan \left (-\frac {{\left (\cos \left (f x + e\right )^{2} - 2 \, \sin \left (f x + e\right ) - 1\right )} \sqrt {-a} \sqrt {\frac {a \sin \left (f x + e\right ) - a}{\sin \left (f x + e\right )}} \sqrt {-\frac {1}{\sin \left (f x + e\right )}}}{2 \, a \cos \left (f x + e\right )}\right )}{f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- \csc {\left (e + f x \right )}} \sqrt {- a \left (\csc {\left (e + f x \right )} - 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs.
\(2 (32) = 64\).
time = 0.85, size = 101, normalized size = 2.66 \begin {gather*} -\frac {\frac {2 \, a \arctan \left (\frac {a^{\frac {3}{2}} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + \sqrt {a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a^{3}}}{\sqrt {-a} a}\right )}{\sqrt {-a}} - \sqrt {a} \log \left ({\left | a^{\frac {3}{2}} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + \sqrt {a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a^{3}} \right |}\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \sqrt {a-\frac {a}{\sin \left (e+f\,x\right )}}\,\sqrt {-\frac {1}{\sin \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________